package com.platform.study.jdk;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: wangyanginfo
 * Date: 13-1-5
 * Time: 上午10:57
 * To change this template use File | Settings | File Templates.
 */
public class ComparatorDemo {

    public static void main(String[] args) {
        List<Integer> list = new ArrayList<Integer>();
        list.add(1);
        list.add(7);
        list.add(6);
        list.add(2);
        System.out.println(list.toString());
        Collections.sort(list);
        System.out.println(list.toString());
    }

}
